package com.hth.stockspiderv3;

public enum StockExchangeMarketEnum {
    SH(0, "SH", "上证"),
    SZ(1, "SZ", "深证"),
    CY(2, "", "创业"),
    KC(3, "", "科创"),
    ;

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public String getName() {
        return name;
    }

    Integer code;
    String desc;
    String name;
    StockExchangeMarketEnum(Integer code, String desc, String name) {
        this.code = code;
        this.desc = desc;
        this.name = name;
    }

    public static StockExchangeMarketEnum findByDesc(String desc) {
        for (StockExchangeMarketEnum value : values()) {
            if (value.getDesc().equals(desc)) {
                return value;
            }
        }
        return null;
    }
}
